package com.systop.ltbook.sms.smsproxy.webservice;

public class SMSPlatformServiceProxy implements com.systop.ltbook.sms.smsproxy.webservice.SMSPlatformService {
  private String _endpoint = null;
  private com.systop.ltbook.sms.smsproxy.webservice.SMSPlatformService sMSPlatformService = null;
  
  public SMSPlatformServiceProxy() {
    _initSMSPlatformServiceProxy();
  }
  
  public SMSPlatformServiceProxy(String endpoint) {
    _endpoint = endpoint;
    _initSMSPlatformServiceProxy();
  }
  
  private void _initSMSPlatformServiceProxy() {
    try {
      sMSPlatformService = (new com.systop.ltbook.sms.smsproxy.webservice.SMSPlatformServiceServiceLocator()).getSMSPlatformServicePort();
      if (sMSPlatformService != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)sMSPlatformService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)sMSPlatformService)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (sMSPlatformService != null)
      ((javax.xml.rpc.Stub)sMSPlatformService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.systop.ltbook.sms.smsproxy.webservice.SMSPlatformService getSMSPlatformService() {
    if (sMSPlatformService == null)
      _initSMSPlatformServiceProxy();
    return sMSPlatformService;
  }
  
  public com.systop.ltbook.sms.smsproxy.webservice.Sequences[] findSeqInfo(java.lang.String clMark) throws java.rmi.RemoteException{
    if (sMSPlatformService == null)
      _initSMSPlatformServiceProxy();
    return sMSPlatformService.findSeqInfo(clMark);
  }
  
  public int sendSMS(java.lang.String[] phonenumber, java.lang.String smscontent, java.lang.Long billcode, java.lang.Long seqno, java.lang.String sendtime, java.lang.String oldpw) throws java.rmi.RemoteException{
    if (sMSPlatformService == null)
      _initSMSPlatformServiceProxy();
    return sMSPlatformService.sendSMS(phonenumber, smscontent, billcode, seqno, sendtime, oldpw);
  }
  
  public java.lang.Integer updateSeqPwd(java.lang.Long seqId, java.lang.String oldpwd, java.lang.String newpwd) throws java.rmi.RemoteException{
    if (sMSPlatformService == null)
      _initSMSPlatformServiceProxy();
    return sMSPlatformService.updateSeqPwd(seqId, oldpwd, newpwd);
  }
  
  public int findBlance(java.lang.Long seqno, java.lang.String oldpw, java.lang.Long billcode, java.lang.Integer phoneNum, java.lang.Integer contentNum) throws java.rmi.RemoteException{
    if (sMSPlatformService == null)
      _initSMSPlatformServiceProxy();
    return sMSPlatformService.findBlance(seqno, oldpw, billcode, phoneNum, contentNum);
  }
  
  public float findMoney(java.lang.Long seqno) throws java.rmi.RemoteException{
    if (sMSPlatformService == null)
      _initSMSPlatformServiceProxy();
    return sMSPlatformService.findMoney(seqno);
  }
  
  public com.systop.ltbook.sms.smsproxy.webservice.Sequences getMaxBill(java.lang.Long seqId) throws java.rmi.RemoteException{
    if (sMSPlatformService == null)
      _initSMSPlatformServiceProxy();
    return sMSPlatformService.getMaxBill(seqId);
  }
  
  public int sendSMSif(java.lang.String[] phonenumber, java.lang.String smscontent, java.lang.Long billcode, java.lang.Long seqno, java.lang.String sendtime, java.lang.String oldpw) throws java.rmi.RemoteException{
    if (sMSPlatformService == null)
      _initSMSPlatformServiceProxy();
    return sMSPlatformService.sendSMSif(phonenumber, smscontent, billcode, seqno, sendtime, oldpw);
  }
  
  public int sendMSG(java.lang.String[] mobiles, java.lang.String smcontent, java.lang.String billcode, java.lang.Long serialNu, java.lang.String sendtime, java.lang.String serialpw, java.lang.String reInfoId) throws java.rmi.RemoteException{
    if (sMSPlatformService == null)
      _initSMSPlatformServiceProxy();
    return sMSPlatformService.sendMSG(mobiles, smcontent, billcode, serialNu, sendtime, serialpw, reInfoId);
  }
  
  public float findClBalanceByClMark(java.lang.String clMark) throws java.rmi.RemoteException{
    if (sMSPlatformService == null)
      _initSMSPlatformServiceProxy();
    return sMSPlatformService.findClBalanceByClMark(clMark);
  }
  
  
}